package com.quanshu.exchange.ui.gui.message.chat.emoji;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.ViewGroup;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by jye on 2017/4/13.
 */
public class EmojiViewPagerAdapter extends FragmentPagerAdapter {

    private List<EmojiFragment> fragmentList = new ArrayList<>();

    public EmojiViewPagerAdapter(FragmentManager fm, List<EmojiFragment> fragmentList) {
        super(fm);
        this.fragmentList = fragmentList;
    }

    @Override
    public Fragment getItem(int position) {

        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }

    @Override
    public Object instantiateItem(ViewGroup container, int position) {

        return super.instantiateItem(container, position);
    }

}